package com.blank.booksystem.controller;

import com.blank.booksystem.server.BookServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author blank 2021-4-14 下午 02:59
 * @version 1.0.0
 */
@Controller
@RequestMapping("/book")
public class BookController {
    @Autowired
    private BookServer bookServer;
    @GetMapping("/findAll")
    public String findAll(ModelMap modelMap){
        modelMap.addAttribute("books",bookServer.findAll());
        System.out.println("++++++++++++++++==");
        return "index";
    }
}
